import VueRouter from 'vue-router'

//引入组件
import Index from '../pages'
import Home from '../pages/home/home'
import Login from '../pages/login/login'
import Register from '../pages/register/register'
import Center from '../pages/center/center'
import Storeup from '../pages/storeup/list'
import payList from '../pages/pay'

import yuangongList from '../pages/yuangong/list'
import yuangongDetail from '../pages/yuangong/detail'
import yuangongAdd from '../pages/yuangong/add'
import huiyishiList from '../pages/huiyishi/list'
import huiyishiDetail from '../pages/huiyishi/detail'
import huiyishiAdd from '../pages/huiyishi/add'
import fenleiList from '../pages/fenlei/list'
import fenleiDetail from '../pages/fenlei/detail'
import fenleiAdd from '../pages/fenlei/add'
import huiyiyudingList from '../pages/huiyiyuding/list'
import huiyiyudingDetail from '../pages/huiyiyuding/detail'
import huiyiyudingAdd from '../pages/huiyiyuding/add'
import huiyitongzhiList from '../pages/huiyitongzhi/list'
import huiyitongzhiDetail from '../pages/huiyitongzhi/detail'
import huiyitongzhiAdd from '../pages/huiyitongzhi/add'
import huiyiziliaoList from '../pages/huiyiziliao/list'
import huiyiziliaoDetail from '../pages/huiyiziliao/detail'
import huiyiziliaoAdd from '../pages/huiyiziliao/add'
import huiyitoupiaoList from '../pages/huiyitoupiao/list'
import huiyitoupiaoDetail from '../pages/huiyitoupiao/detail'
import huiyitoupiaoAdd from '../pages/huiyitoupiao/add'
import toupiaojiluList from '../pages/toupiaojilu/list'
import toupiaojiluDetail from '../pages/toupiaojilu/detail'
import toupiaojiluAdd from '../pages/toupiaojilu/add'
import tongzhigonggaoList from '../pages/tongzhigonggao/list'
import tongzhigonggaoDetail from '../pages/tongzhigonggao/detail'
import tongzhigonggaoAdd from '../pages/tongzhigonggao/add'
import yijianshoujiList from '../pages/yijianshouji/list'
import yijianshoujiDetail from '../pages/yijianshouji/detail'
import yijianshoujiAdd from '../pages/yijianshouji/add'
import shebeibaoxiuList from '../pages/shebeibaoxiu/list'
import shebeibaoxiuDetail from '../pages/shebeibaoxiu/detail'
import shebeibaoxiuAdd from '../pages/shebeibaoxiu/add'
import discusshuiyishiList from '../pages/discusshuiyishi/list'
import discusshuiyishiDetail from '../pages/discusshuiyishi/detail'
import discusshuiyishiAdd from '../pages/discusshuiyishi/add'
import discusshuiyiziliaoList from '../pages/discusshuiyiziliao/list'
import discusshuiyiziliaoDetail from '../pages/discusshuiyiziliao/detail'
import discusshuiyiziliaoAdd from '../pages/discusshuiyiziliao/add'
import discusshuiyitoupiaoList from '../pages/discusshuiyitoupiao/list'
import discusshuiyitoupiaoDetail from '../pages/discusshuiyitoupiao/detail'
import discusshuiyitoupiaoAdd from '../pages/discusshuiyitoupiao/add'
import discussyijianshoujiList from '../pages/discussyijianshouji/list'
import discussyijianshoujiDetail from '../pages/discussyijianshouji/detail'
import discussyijianshoujiAdd from '../pages/discussyijianshouji/add'

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
	return originalPush.call(this, location).catch(err => err)
}

//配置路由
export default new VueRouter({
	routes:[
		{
      path: '/',
      redirect: '/index/home'
    },
		{
			path: '/index',
			component: Index,
			children:[
				{
					path: 'home',
					component: Home
				},
				{
					path: 'center',
					component: Center,
				},
				{
					path: 'pay',
					component: payList,
				},
				{
					path: 'storeup',
					component: Storeup
				},
				{
					path: 'yuangong',
					component: yuangongList
				},
				{
					path: 'yuangongDetail',
					component: yuangongDetail
				},
				{
					path: 'yuangongAdd',
					component: yuangongAdd
				},
				{
					path: 'huiyishi',
					component: huiyishiList
				},
				{
					path: 'huiyishiDetail',
					component: huiyishiDetail
				},
				{
					path: 'huiyishiAdd',
					component: huiyishiAdd
				},
				{
					path: 'fenlei',
					component: fenleiList
				},
				{
					path: 'fenleiDetail',
					component: fenleiDetail
				},
				{
					path: 'fenleiAdd',
					component: fenleiAdd
				},
				{
					path: 'huiyiyuding',
					component: huiyiyudingList
				},
				{
					path: 'huiyiyudingDetail',
					component: huiyiyudingDetail
				},
				{
					path: 'huiyiyudingAdd',
					component: huiyiyudingAdd
				},
				{
					path: 'huiyitongzhi',
					component: huiyitongzhiList
				},
				{
					path: 'huiyitongzhiDetail',
					component: huiyitongzhiDetail
				},
				{
					path: 'huiyitongzhiAdd',
					component: huiyitongzhiAdd
				},
				{
					path: 'huiyiziliao',
					component: huiyiziliaoList
				},
				{
					path: 'huiyiziliaoDetail',
					component: huiyiziliaoDetail
				},
				{
					path: 'huiyiziliaoAdd',
					component: huiyiziliaoAdd
				},
				{
					path: 'huiyitoupiao',
					component: huiyitoupiaoList
				},
				{
					path: 'huiyitoupiaoDetail',
					component: huiyitoupiaoDetail
				},
				{
					path: 'huiyitoupiaoAdd',
					component: huiyitoupiaoAdd
				},
				{
					path: 'toupiaojilu',
					component: toupiaojiluList
				},
				{
					path: 'toupiaojiluDetail',
					component: toupiaojiluDetail
				},
				{
					path: 'toupiaojiluAdd',
					component: toupiaojiluAdd
				},
				{
					path: 'tongzhigonggao',
					component: tongzhigonggaoList
				},
				{
					path: 'tongzhigonggaoDetail',
					component: tongzhigonggaoDetail
				},
				{
					path: 'tongzhigonggaoAdd',
					component: tongzhigonggaoAdd
				},
				{
					path: 'yijianshouji',
					component: yijianshoujiList
				},
				{
					path: 'yijianshoujiDetail',
					component: yijianshoujiDetail
				},
				{
					path: 'yijianshoujiAdd',
					component: yijianshoujiAdd
				},
				{
					path: 'shebeibaoxiu',
					component: shebeibaoxiuList
				},
				{
					path: 'shebeibaoxiuDetail',
					component: shebeibaoxiuDetail
				},
				{
					path: 'shebeibaoxiuAdd',
					component: shebeibaoxiuAdd
				},
				{
					path: 'discusshuiyishi',
					component: discusshuiyishiList
				},
				{
					path: 'discusshuiyishiDetail',
					component: discusshuiyishiDetail
				},
				{
					path: 'discusshuiyishiAdd',
					component: discusshuiyishiAdd
				},
				{
					path: 'discusshuiyiziliao',
					component: discusshuiyiziliaoList
				},
				{
					path: 'discusshuiyiziliaoDetail',
					component: discusshuiyiziliaoDetail
				},
				{
					path: 'discusshuiyiziliaoAdd',
					component: discusshuiyiziliaoAdd
				},
				{
					path: 'discusshuiyitoupiao',
					component: discusshuiyitoupiaoList
				},
				{
					path: 'discusshuiyitoupiaoDetail',
					component: discusshuiyitoupiaoDetail
				},
				{
					path: 'discusshuiyitoupiaoAdd',
					component: discusshuiyitoupiaoAdd
				},
				{
					path: 'discussyijianshouji',
					component: discussyijianshoujiList
				},
				{
					path: 'discussyijianshoujiDetail',
					component: discussyijianshoujiDetail
				},
				{
					path: 'discussyijianshoujiAdd',
					component: discussyijianshoujiAdd
				},
			]
		},
		{
			path: '/login',
			component: Login
		},
		{
			path: '/register',
			component: Register
		},
	]
})
